package jwdt.common.action;

import jwdt.xadmin.system.bean.TSystem;

import com.ezerg.db.Jdb;
import com.ezerg.ioc.ApplicationContext;
import com.ezerg.ioc.ApplicationContextFactory;
import com.ezerg.web.Form;
import com.ezerg.web.IAction;
import com.ezerg.web.Module;
import com.ezerg.web.Page;

public class BaseAction implements IAction {
	
	protected String select_news = " SELECT id, title, titlecolor, titleface, url, updatetime, istop, goodnews, daodu,TO_DAYS(NOW())-TO_DAYS(updatetime)<3 AS n FROM t_news ";
	protected String order_news = " ORDER BY istop DESC, updatetime DESC ";
	
	protected String select_bbsnews = " SELECT announceid, parentid, boardid, username, topic, dateandtime, hits, isbest, istop FROM bbs_bbs1 ";
	protected String order_bbsnews = " ORDER BY istop DESC, dateandtime DESC ";

	protected Jdb jdb = Jdb.get();
	protected TSystem sys = (TSystem)jdb.get(TSystem.class, 1);
	protected ApplicationContext app = ApplicationContextFactory.getApplicationContext();
	
	public BaseAction() {
	}

	public Page execute(Form f, Module m) throws Exception {
		return m.defaultPage();
	}
}
